package main

import "fmt"

func main() {

	var results []int //长度为0容量为0的空切片
	fmt.Println(results,cap(results),len(results))
	results = append(results,1)
	fmt.Println(results,cap(results),len(results))

	mySlice := []string{"a", "b", "c", "g", "m", "z"}
	fmt.Println(mySlice)
	fmt.Println(mySlice[2:4])
	fmt.Println(mySlice[2])
	fmt.Println(mySlice[:])
	fmt.Println(mySlice[3:])
	fmt.Println(mySlice[:3])
	fmt.Println("mySlice"[2]) //字符串数组
}